/**
 * 
 */
package calculation;

/**
 * @author Michael
 *
 * to calculate the number of 1s in from 1 to n in binary format
 * example
 *
 * Solution: calc(n) = number of 1 from 1 to n in binary format
 *           count(n) = number of 1 for n in bianry format
 *     calc(0) = 0;
 *     calc(n)
 *        = calc(k-1) * 2 + k, where n = 2k - 1
 *        = calc(2k-1) + count(n), where n = 2k;
 */
public class CountNumberOF1inBinary {

	/**
	 * 
	 */
	public CountNumberOF1inBinary() {
		// TODO Auto-generated constructor stub
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}
